package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    int queryCount();

    List<Role> queryList(QueryObject qo);

    void insertPermissionRelation(@Param("roleId") Long roleId,@Param("permissionId") Long permissionId);

    void deletePermissionRelation( Long roleId);

    void insertMenuRelation(@Param("roleId") Long roleId,@Param("menuId") Long menuId);

    void deleteMenuRelation( Long roleId);

    List<Long> selectByEmployeeId(Long employeeId);

    List<String> selectNameByEmployeeId(Long employeeId);

}